//
//  MCVIdeoTranNofitVc.swift
//  MCBodyBuildingPro
//
//  Created by Renlvshijie on 2023/5/21.
//

import UIKit

class MCVIdeoTranNofitVc: MCBaseVc {
    
    
    public var ids:String = ""
    
    private var isVideo = false
    
    @IBOutlet weak var noVideoBtn: UIButton!
    
    @IBOutlet weak var haveVideoBtn: UIButton!
    
    
    
    override func viewDidLoad() {
        super.viewDidLoad()

        self.view.backgroundColor = UIColor.qmui_color(withHexString: "#F7F7F9")
        self.navigationItem.title = "训练须知"
    }

    //没视频
    @IBAction func noVideoSender(_ sender: UIButton) {
        sender.isSelected = true
        self.haveVideoBtn.isSelected = false
        if sender.isSelected == true {
         sender.setImage(UIImage(named: "common_select_in_gray_image"), for: .selected)
         self.haveVideoBtn.setImage(UIImage(named: "common_unselect_light_gray_image"), for: .normal)
         self.isVideo = false
        }
        

    }
    
    //有视频的
    @IBAction func haveVideoSender(_ sender: UIButton) {
        sender.isSelected = true
        self.noVideoBtn.isSelected = false
        if sender.isSelected == true {
            sender.setImage(UIImage(named: "common_select_in_gray_image"), for: .selected)
             self.noVideoBtn.setImage(UIImage(named: "common_unselect_light_gray_image"), for: .normal)
            self.isVideo = true
        }
        
       
       
    }
    
    @IBAction func startTrainBtn(_ sender: UIButton) {
        if self.isVideo == false {
            let noVideoTrainVc = MCNoVideoTrainVc.init()
            noVideoTrainVc.userPlanId = ids
            self.navigationController?.pushViewController(noVideoTrainVc, animated: true)
        }else {
            let haveVideoTrainVc = MCHaveVideoTrainVc.init()
            haveVideoTrainVc.userPlanId = ids
            self.navigationController?.pushViewController(haveVideoTrainVc, animated: true)
        }
       
        
      
        
    }
    
}
